<?php 
require "DataLoad.php"; 
CheckAdmin2();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title><?php echo $GuildName;?> - DKP系统</title>
<script language="JavaScript" src="inc/jquery.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="Generator" content="EditPlus">
<meta name="Author" content="SULei">
<meta name="Keywords" content="DKP WOW GUILD">
<meta name="Description" content="">
<link href="<?php echo $StylePath;?>/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="<?php echo $StylePath;?>/styleplus.js"></script>
<style type="text/css" media="all">

</style>

</head>

<body onload='javascript:eventselectclass()' >
<div class="header">
<?php require "menu.php"; ?>

</div>
<div class="main">
<?php 
eventsedit();
?>
</div>
<?php require "footer.php"; ?>

<script type=text/javascript>
function eventselectclass() {
	var sclass=document.forms["eventadd"].event_class.value
	if (sclass=="加入" || sclass=="离开") {
		document.forms["eventadd"].object.className="action"
		document.forms["eventadd"].object2.className="unuse"
		document.forms["eventadd"].event_dkp.className="unuse"
		document.forms["eventadd"].event_dkp2.className="unuse"
	}
	else if (sclass=="拾取") {
		document.forms["eventadd"].object.className="action"
		document.forms["eventadd"].object2.className="action"
		document.forms["eventadd"].event_dkp.className="action"
		document.forms["eventadd"].event_dkp2.className="action"
	}
	else if (sclass=="分解") {
		document.forms["eventadd"].object.className="unuse"
		document.forms["eventadd"].object2.className="action"
		document.forms["eventadd"].event_dkp.className="action"		
		document.forms["eventadd"].event_dkp2.className="unuse"
	}
	else if (sclass=="发现" || sclass=="首次" || sclass=="击杀") {
		document.forms["eventadd"].object.className="unuse"
		document.forms["eventadd"].object2.className="action"
		document.forms["eventadd"].event_dkp.className="action"		
		document.forms["eventadd"].event_dkp2.className="unuse"
	}
	else if (sclass=="团队事件") {
		document.forms["eventadd"].object.className="unuse"
		document.forms["eventadd"].object2.className="action"
		document.forms["eventadd"].event_dkp.className="action"
		document.forms["eventadd"].event_dkp2.className="unuse"
	}
	else if (sclass=="个人事件") {
		document.forms["eventadd"].object.className="action"
		document.forms["eventadd"].object2.className="action"
		document.forms["eventadd"].event_dkp.className="action"
		document.forms["eventadd"].event_dkp2.className="unuse"
	}	else {
		document.forms["eventadd"].object.className="unuse"
		document.forms["eventadd"].object2.className="action"
		document.forms["eventadd"].event_dkp.className="action"		
		document.forms["eventadd"].event_dkp2.className="unuse"
	}}

var currentActiveTab = "menuB";

</script>

</body>
</html>

<?php 
function eventsedit() {
	$sql="select * from raid_event where id=".$_GET['id'];
	if ($result = mysql_query($sql)) {
		$row = mysql_fetch_array($result);
		print "<form name='eventadd' action='admin_eventadd.php?action=edit' method='post'>";
		print "<table class='reportform outframe'>";
		print "<tr><th colspan='6'>编辑事件</th></tr>";
		print "<tr class='coltitle'><td>时间</td><td>类型</td><td>对象/描述</td><td>分数</td><td>分数2</td><td></td></tr>";
		print "<tr><td><input type='text' name='event_time' size='20' value='".$row["event_time"]."' /></td><td>".eventclass($row["event_class"])."</td> <td>".raidmemberselect($_GET['rid'],$row["event_object"])."<input type='' class='unuse' name='object2' value='".$row["event_object2"]."'  size='14'/></td>";
		print " <td><input type='text' class='unuse' name='event_dkp' value='".$row["event_dkp"]."' size='6'/></td><td><input type='text' class='unuse' tip='OK' name='event_dkp2' value='".$row["event_dkp2"]."' size='6'/></td><td><input type='submit' value='修改'/><input type='hidden' name='postid' value='".$_GET['id']."' /><input type='hidden' name='rid' value='".$_GET['rid']."' /></td></tr>";
		print "</table>";
		print "</form>";
	}else{
		return false;
	}
} 
?>

